//base
import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
//less
import './index.less'
import If from '../if'

class BottomLoading extends Component {
  componentWillMount() {
    //onLoad
  }

  componentDidMount() {
    //onready
  }

  componentWillUnmount() {
    //onUnload
  }

  componentWillReceiveProps(nextProps) {}

  render() {
    const { haveNext, idName } = this.props
    // 	renderElse={
    // 	<View className="bottom-nothave">
    // 		<View className="line-deep"></View>
    // 		<View className="load-not"><Text className="load-not-text">我是有底线的</Text></View>
    // 		<View className="line-deep"></View>
    // 	</View>
    // }
    return (
      <View className="LoadMore_id14382">
        <If visible={haveNext}>
          <View id={idName} className="bottom-loading">
            <View className="animate-loading" />
            <View className="load-on">
              <Text className="load-on-text">正在加载</Text>
            </View>
          </View>
        </If>
      </View>
    )
  }
}

export default BottomLoading
